namespace Agro.Models {
        using System;
        using SN.Data;
        
        /// <summary>
        /// 表名：T_Menu 主键列：Menu_ID
        /// </summary>
        [SerializableAttribute()]
        public partial class T_Menu : Entity {
            
            protected Int32 _Menu_ID;
            
            protected String _Menu_NAME;
            
            protected String _Menu_Url;
            
            protected Int32? _Menu_ParentID;
            
            protected String _Menu_Image;
            
            protected String _Menu_ClickImage;
            
            protected String _Menu_IsShow;
            
            protected String _Menu_IsPermission;
            
            protected String _Menu_ShowPosition;
            
            protected String _Menu_IsDetail;
            
            protected Int32? _Menu_Order;
            
            protected Int32? _Menu_LayerIndex;
            
            protected String _Menu_IsDel;
            
            protected String _Menu_CreateUserID;
            
            protected String _Menu_CreateDate;
            
            protected String _Menu_CreateIP;
            
            /// <summary>
            /// ID
            /// </summary>
            public Int32 Menu_ID {
                get {
                    return this._Menu_ID;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_ID, _Menu_ID, value);
                    this._Menu_ID = value;
                }
            }
            
            /// <summary>
            /// 名称
            /// </summary>
            public String Menu_NAME {
                get {
                    return this._Menu_NAME;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_NAME, _Menu_NAME, value);
                    this._Menu_NAME = value;
                }
            }
            
            /// <summary>
            /// URL
            /// </summary>
            public String Menu_Url {
                get {
                    return this._Menu_Url;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_Url, _Menu_Url, value);
                    this._Menu_Url = value;
                }
            }
            
            /// <summary>
            /// 上级ID
            /// </summary>
            public Int32? Menu_ParentID {
                get {
                    return this._Menu_ParentID;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_ParentID, _Menu_ParentID, value);
                    this._Menu_ParentID = value;
                }
            }
            
            /// <summary>
            /// 显示图标
            /// </summary>
            public String Menu_Image {
                get {
                    return this._Menu_Image;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_Image, _Menu_Image, value);
                    this._Menu_Image = value;
                }
            }
            
            /// <summary>
            /// 点击后图标
            /// </summary>
            public String Menu_ClickImage {
                get {
                    return this._Menu_ClickImage;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_ClickImage, _Menu_ClickImage, value);
                    this._Menu_ClickImage = value;
                }
            }
            
            /// <summary>
            /// 0不显示 1显示
            /// </summary>
            public String Menu_IsShow {
                get {
                    return this._Menu_IsShow;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_IsShow, _Menu_IsShow, value);
                    this._Menu_IsShow = value;
                }
            }
            
            /// <summary>
            /// 0不控制 1控制
            /// </summary>
            public String Menu_IsPermission {
                get {
                    return this._Menu_IsPermission;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_IsPermission, _Menu_IsPermission, value);
                    this._Menu_IsPermission = value;
                }
            }
            
            /// <summary>
            /// 0公共  1加载报表字典以后加载  2系统管理显示
            /// </summary>
            public String Menu_ShowPosition {
                get {
                    return this._Menu_ShowPosition;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_ShowPosition, _Menu_ShowPosition, value);
                    this._Menu_ShowPosition = value;
                }
            }
            
            /// <summary>
            /// 是否明细
            /// </summary>
            public String Menu_IsDetail {
                get {
                    return this._Menu_IsDetail;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_IsDetail, _Menu_IsDetail, value);
                    this._Menu_IsDetail = value;
                }
            }
            
            /// <summary>
            /// 顺序
            /// </summary>
            public Int32? Menu_Order {
                get {
                    return this._Menu_Order;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_Order, _Menu_Order, value);
                    this._Menu_Order = value;
                }
            }
            
            /// <summary>
            /// 所在级次
            /// </summary>
            public Int32? Menu_LayerIndex {
                get {
                    return this._Menu_LayerIndex;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_LayerIndex, _Menu_LayerIndex, value);
                    this._Menu_LayerIndex = value;
                }
            }
            
            /// <summary>
            /// 是否删除0不删除，1删除
            /// </summary>
            public String Menu_IsDel {
                get {
                    return this._Menu_IsDel;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_IsDel, _Menu_IsDel, value);
                    this._Menu_IsDel = value;
                }
            }
            
            /// <summary>
            /// 创建人员
            /// </summary>
            public String Menu_CreateUserID {
                get {
                    return this._Menu_CreateUserID;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_CreateUserID, _Menu_CreateUserID, value);
                    this._Menu_CreateUserID = value;
                }
            }
            
            /// <summary>
            /// 创建时间
            /// </summary>
            public String Menu_CreateDate {
                get {
                    return this._Menu_CreateDate;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_CreateDate, _Menu_CreateDate, value);
                    this._Menu_CreateDate = value;
                }
            }
            
            /// <summary>
            /// 创建IP
            /// </summary>
            public String Menu_CreateIP {
                get {
                    return this._Menu_CreateIP;
                }
                set {
                    this.OnPropertyValueChange(_.Menu_CreateIP, _Menu_CreateIP, value);
                    this._Menu_CreateIP = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<T_Menu>("T_Menu");
            }
            
            /// <summary>
            /// 获取实体中的标识列
            /// </summary>
            protected override Field GetIdentityField() {
                return _.Menu_ID;
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.Menu_ID};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.Menu_ID,
                        _.Menu_NAME,
                        _.Menu_Url,
                        _.Menu_ParentID,
                        _.Menu_Image,
                        _.Menu_ClickImage,
                        _.Menu_IsShow,
                        _.Menu_IsPermission,
                        _.Menu_ShowPosition,
                        _.Menu_IsDetail,
                        _.Menu_Order,
                        _.Menu_LayerIndex,
                        _.Menu_IsDel,
                        _.Menu_CreateUserID,
                        _.Menu_CreateDate,
                        _.Menu_CreateIP};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._Menu_ID,
                        this._Menu_NAME,
                        this._Menu_Url,
                        this._Menu_ParentID,
                        this._Menu_Image,
                        this._Menu_ClickImage,
                        this._Menu_IsShow,
                        this._Menu_IsPermission,
                        this._Menu_ShowPosition,
                        this._Menu_IsDetail,
                        this._Menu_Order,
                        this._Menu_LayerIndex,
                        this._Menu_IsDel,
                        this._Menu_CreateUserID,
                        this._Menu_CreateDate,
                        this._Menu_CreateIP};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.Menu_ID))) {
                    this._Menu_ID = reader.GetInt32(_.Menu_ID);
                }
                if ((false == reader.IsDBNull(_.Menu_NAME))) {
                    this._Menu_NAME = reader.GetString(_.Menu_NAME);
                }
                if ((false == reader.IsDBNull(_.Menu_Url))) {
                    this._Menu_Url = reader.GetString(_.Menu_Url);
                }
                if ((false == reader.IsDBNull(_.Menu_ParentID))) {
                    this._Menu_ParentID = reader.GetInt32(_.Menu_ParentID);
                }
                if ((false == reader.IsDBNull(_.Menu_Image))) {
                    this._Menu_Image = reader.GetString(_.Menu_Image);
                }
                if ((false == reader.IsDBNull(_.Menu_ClickImage))) {
                    this._Menu_ClickImage = reader.GetString(_.Menu_ClickImage);
                }
                if ((false == reader.IsDBNull(_.Menu_IsShow))) {
                    this._Menu_IsShow = reader.GetString(_.Menu_IsShow);
                }
                if ((false == reader.IsDBNull(_.Menu_IsPermission))) {
                    this._Menu_IsPermission = reader.GetString(_.Menu_IsPermission);
                }
                if ((false == reader.IsDBNull(_.Menu_ShowPosition))) {
                    this._Menu_ShowPosition = reader.GetString(_.Menu_ShowPosition);
                }
                if ((false == reader.IsDBNull(_.Menu_IsDetail))) {
                    this._Menu_IsDetail = reader.GetString(_.Menu_IsDetail);
                }
                if ((false == reader.IsDBNull(_.Menu_Order))) {
                    this._Menu_Order = reader.GetInt32(_.Menu_Order);
                }
                if ((false == reader.IsDBNull(_.Menu_LayerIndex))) {
                    this._Menu_LayerIndex = reader.GetInt32(_.Menu_LayerIndex);
                }
                if ((false == reader.IsDBNull(_.Menu_IsDel))) {
                    this._Menu_IsDel = reader.GetString(_.Menu_IsDel);
                }
                if ((false == reader.IsDBNull(_.Menu_CreateUserID))) {
                    this._Menu_CreateUserID = reader.GetString(_.Menu_CreateUserID);
                }
                if ((false == reader.IsDBNull(_.Menu_CreateDate))) {
                    this._Menu_CreateDate = reader.GetString(_.Menu_CreateDate);
                }
                if ((false == reader.IsDBNull(_.Menu_CreateIP))) {
                    this._Menu_CreateIP = reader.GetString(_.Menu_CreateIP);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(T_Menu).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<T_Menu>();
                
                /// <summary>
                /// ID - 字段名：Menu_ID - 数据类型：Int32
                /// </summary>
                public static Field Menu_ID = new Field<T_Menu>("Menu_ID");
                
                /// <summary>
                /// 名称 - 字段名：Menu_NAME - 数据类型：String
                /// </summary>
                public static Field Menu_NAME = new Field<T_Menu>("Menu_NAME");
                
                /// <summary>
                /// URL - 字段名：Menu_Url - 数据类型：String
                /// </summary>
                public static Field Menu_Url = new Field<T_Menu>("Menu_Url");
                
                /// <summary>
                /// 上级ID - 字段名：Menu_ParentID - 数据类型：Nullable`1
                /// </summary>
                public static Field Menu_ParentID = new Field<T_Menu>("Menu_ParentID");
                
                /// <summary>
                /// 显示图标 - 字段名：Menu_Image - 数据类型：String
                /// </summary>
                public static Field Menu_Image = new Field<T_Menu>("Menu_Image");
                
                /// <summary>
                /// 点击后图标 - 字段名：Menu_ClickImage - 数据类型：String
                /// </summary>
                public static Field Menu_ClickImage = new Field<T_Menu>("Menu_ClickImage");
                
                /// <summary>
                /// 0不显示 1显示 - 字段名：Menu_IsShow - 数据类型：String
                /// </summary>
                public static Field Menu_IsShow = new Field<T_Menu>("Menu_IsShow");
                
                /// <summary>
                /// 0不控制 1控制 - 字段名：Menu_IsPermission - 数据类型：String
                /// </summary>
                public static Field Menu_IsPermission = new Field<T_Menu>("Menu_IsPermission");
                
                /// <summary>
                /// 0公共  1加载报表字典以后加载  2系统管理显示 - 字段名：Menu_ShowPosition - 数据类型：String
                /// </summary>
                public static Field Menu_ShowPosition = new Field<T_Menu>("Menu_ShowPosition");
                
                /// <summary>
                /// 是否明细 - 字段名：Menu_IsDetail - 数据类型：String
                /// </summary>
                public static Field Menu_IsDetail = new Field<T_Menu>("Menu_IsDetail");
                
                /// <summary>
                /// 顺序 - 字段名：Menu_Order - 数据类型：Nullable`1
                /// </summary>
                public static Field Menu_Order = new Field<T_Menu>("Menu_Order");
                
                /// <summary>
                /// 所在级次 - 字段名：Menu_LayerIndex - 数据类型：Nullable`1
                /// </summary>
                public static Field Menu_LayerIndex = new Field<T_Menu>("Menu_LayerIndex");
                
                /// <summary>
                /// 是否删除0不删除，1删除 - 字段名：Menu_IsDel - 数据类型：String
                /// </summary>
                public static Field Menu_IsDel = new Field<T_Menu>("Menu_IsDel");
                
                /// <summary>
                /// 创建人员 - 字段名：Menu_CreateUserID - 数据类型：String
                /// </summary>
                public static Field Menu_CreateUserID = new Field<T_Menu>("Menu_CreateUserID");
                
                /// <summary>
                /// 创建时间 - 字段名：Menu_CreateDate - 数据类型：String
                /// </summary>
                public static Field Menu_CreateDate = new Field<T_Menu>("Menu_CreateDate");
                
                /// <summary>
                /// 创建IP - 字段名：Menu_CreateIP - 数据类型：String
                /// </summary>
                public static Field Menu_CreateIP = new Field<T_Menu>("Menu_CreateIP");
            }
        }
    }
    